import {defineStore} from 'pinia';
import {SetupStoreId} from '@/enum';

export const useProjectStore = defineStore({
    id: SetupStoreId.Project,
    state: (): any => ({
        currentProject: undefined,
        currentMonitorId: undefined
    }),
    getters: {},
    actions: {
        changeCurrentProject(data: any) {
            this.currentProject = data;
        },
        changeCurrentMonitorId(data: any) {
            console.log('aaaaaaaaa', data)
            this.currentMonitorId = data;
        }
    },
    persist: {
        key: SetupStoreId.Project,
        storage: localStorage
    }
});
